﻿namespace WizardEngine.Core.Persistence
{
    using System;

    /// <summary>
    /// Base implementation for all perstitence providers to be used with wizards. 
    /// </summary>
    public abstract class FlowStatePersistenceProviderBase : IFlowStatePersistenceProvider
    {
        /// <summary>
        /// Loads requested flow instance by specified identifier. 
        /// </summary>
        /// <typeparam name="T">Specific custom flow state type. Must match with flow state instance type being loaded. </typeparam>
        /// <param name="flowInstanceId">Unique identifier of flow instance. </param>
        /// <exception cref="FlowInstanceStateNotFound" />
        /// <exception cref="FlowInstanceStateTypeMismatch" />
        /// <returns>Custom flow state object restored from persistent storage. </returns>
        public T Load<T>(Guid flowInstanceId) where T : FlowState
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Saves flow state instance. 
        /// </summary>
        /// <typeparam name="T">Specific custom flow state type. Must match with flow state instance type being loaded. </typeparam>
        /// <param name="flowInstanceState">Flow state to be persisted. </param>
        /// <exception cref="FlowInstanceStateTypeMismatch">
        /// Occurs when you try save instance with already persisted Guid but using different custom FlowStatetype. 
        /// </exception>
        public void Save<T>(T flowInstanceState) where T : FlowState
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Removes flow state completely from the storage. 
        /// </summary>
        /// <param name="flowInstanceId">Unique identifier of flow instance. </param>
        /// <exception cref="FlowInstanceStateNotFound" />
        public void Remove(Guid flowInstanceId)
        {
            throw new NotImplementedException();
        }
    }
}
